package main

import "fmt"

type A struct {
	a int
}
type B struct {
	a int
	b *B
}

func (b *B) add()  {
	b.a++

}
func mk(a int) A {
	return A{a}
}
func main()  {
	ai := new(A)
	am :=mk(3)
	var  ai2 A
	var a3 *A
	ab := struct {
		a int
		b *B
	}{1,nil}
	b :=B{1,&B{2,&B{a:3}}}
	b = B{a:1}
	b.add()
	fmt.Println(am)
	fmt.Println(ab)
	fmt.Println(b)
	fmt.Printf("%T  %T\n",ai,ai2)
	a3 = ai//
	fmt.Println(ai.a,ai2.a,a3.a)
}